package com.luoran.bartalks.utils;

/**
 * APP用户操作类型
 * 
 * @author WMM 2018年3月5日上午11:25:21
 * @version 1.0
 */
public enum EnumOperationType {

	LOGIN(1, "登录"), LOADING(2, "装货"), UNLOAD(3, "卸货"), RULE(4, "打尺"), PHOTOGRAPH(5, "拍照"), LOGOUT(6, "登出"), OTHER(99, "其他");

	private final Integer value;
	private final String name;

	EnumOperationType(Integer value, String name) {
		this.value = value;
		this.name = name;
	}

	public Integer getValue() {
		return this.value;
	}

	public String getName() {
		return this.name;
	}

	public  static String getValueByName(Integer value) {
		String name = "";
		switch (value) {
		case 1:
			name = LOGIN.getName();
			break;
		case 2:
			name = LOADING.getName();
			break;
		case 3:
			name = UNLOAD.getName();
			break;
		case 4:
			name = RULE.getName();
			break;
		case 5:
			name = PHOTOGRAPH.getName();
			break;
		case 6:
			name = LOGOUT.getName();
			break;
		default:
			name = "未知";
			break;
		}
		return name;
	}
}
